using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerInGround : MonoBehaviour
{
    public bool in_ground = false;
    public List<GameObject> objects;

    void Update()
    {
        if (objects.Count == 0)
        {
            in_ground = false;
        }
        else
        {
            in_ground = true;
        }
    }

    void OnTriggerEnter(Collider other)
    {
        print("in");
        objects.Add(other.gameObject);
    }

    void OnTriggerExit(Collider other)
    {
        print("out");
        objects.Remove(other.gameObject);
    }
}
